
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.*;


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author HP
 */
public class CricketGame extends GameCanvas implements Runnable{
    
    private LayerManager mLayerManager;
    private TiledLayer backGroundFrame1;
    private TiledLayer backGroundFrame2;
    private TiledLayer backGroundFrame3;
    private TiledLayer backGroundFrame4;
    private TiledLayer backGroundFrame5;
    
    public CricketGame()
    {
        super(true);
        mLayerManager = new LayerManager();
        Graphics g = getGraphics();
        createBackGroundFrame1(g);
        createBackGroundFrame2(g);
        createBackGroundFrame3(g);
        createBackGroundFrame4(g);
        createBackGroundFrame5(g);
        Thread t = new Thread(this);
        t.start();
        
    }
    
    public void createCricket(Graphics g)
    {
        
    }
    
    public void createBackGroundFrame1(Graphics g)
    {
//       Image im = Image.createImage("\grass.png");
//        g = getGraphics();
//        backGroundFrame1 = new TiledLayer(8, 10, im, 32, 32);
//
//        int[] map = {
//            12, 12, 7, 12, 12, 12, 12, 12,
//            12, 12, 14, 12, 12, 12, 12, 12,
//            12, 12, 14, 12, 12, 12, 12, 12,
//            12, 12, 21, 12, 12, 12, 12, 12,
//            12, 12, 12, 12, 12, 12, 12, 12,
//            12, 12, 12, 12, 12, 12, 12, 12,
//            12, 12, 12, 12, 12, 12, 12, 12,
//            12, 12, 12, 12, 12, 12, 12, 12,
//            12, 12, 12, 12, 12, 12, 12, 12,
//            12, 5, 5, 5, 5, 12, 12, 12};
//
//        for (int i = 0; i < map.length; i++) {
//            int column = i % 8;
//            int row = (i - column) / 8;
//            mGround.setCell(column, row, map[i]);
//        }
//        mLayerManager.append(mGround);
//        mLayerManager.paint(g, 0, 0);
    }
    
    public void createBackGroundFrame2(Graphics g)
    {
        
    }
    
    public void createBackGroundFrame3(Graphics g)
    {
        
    }
    
    public void createBackGroundFrame4(Graphics g)
    {
        
    }
    
    public void createBackGroundFrame5(Graphics g)
    {
        
    }
    
    public void run() {
        
    }
    
}
